{empty name="data"}
<p style="margin-top: 4rem; text-align: center;"> 暂无数据... </p>
{else /}
<style>
    .exerciseBtn {
        position: inherit;
        width: 90%;
        margin: 2rem auto;
        border-radius: 7px;
    }
    .exerciseBtn a {
        border-radius: 7px;
    }
</style>
<div class="weui-popup__overlay"></div>
<div class="weui-popup__modal">
    <div class="toolbar">
        <div class="toolbar-inner">
            <h1 class="title cl-3333 fs075">活动详情</h1>
            <a href="javascript:;" class="cl-666 picker-button close close-popup close">
                <i class="icon iconfont icon-guanbi1"></i>
            </a>
        </div>
    </div>
    <div class="modal-content fs06 bg-fff " style="padding-bottom: 1rem; max-height: 70vh;" >
        <div class="weui-cell radiusImg">
            <div class="weui-cell__hd">
                <img src="{$data.headimgurl}" alt="">
            </div>
            <div class="weui-cell__bd">
                <p class="fs06">{$data.nickname}</p>
                <p class="fs06 cl-9999">{$data.application_time}</p>
            </div>
            <div class="weui-cell__ft fs06">
                <p class="cl-315">{$data.schedule}</p>
                <p class="cl-9999">{$data.time_remaining}</p>
            </div>
        </div>
        <div class="weui-cell ftAbsolute">
            <div class="weui-cell__bd">
                <p class="fs07">{$data.name}</p>
                <p class="fs06 cl-9999">已有<span class="cl-c40">{$data.num}</span>人参加(限<span class="cl-c40">{$data.population}</span>人)
                    <a href="{:url('activity/group_chat', ['id' => $data.id])}" class="cl-f45">进入群聊</a>
                </p>
            </div>
            <div class="weui-cell__ft">
                <span class="cl-315 fs065">{$data.is_aa}</span>
            </div>
        </div>
        <div class="plr05 bg-fff">
            <p class="cl-9999 mtop01">时间 <span>{$data.start_time|date="Y-m-d H:i:s",###}</span></p>
            <p class="cl-9999">地址: <span>{$data.address}</span></p>
            <p class="cl-9999">活动说明: <span>{$data.msg}</span></p>
        </div>
        <div class="discussList-list-img viewImage">
            {volist name="data.images" id="vo"}
            <img class="viewPhone" data-img="{$i - 1}" src="{$vo}" alt="{$vo}">
            {/volist}
        </div>
        {eq name="data.status" value="已结束"}
        <div class="my-flex exerciseBtn">
            <a href="javascript:;" class="repulse cl-f fs065 bg-5c i_want_to_participate">已结束</a>
        </div>
        {else /}
        {eq name="data.member_status" value="发起者"}
        <div class="my-flex exerciseBtn">
            <a href="{:url('activity_member', ['id' => $data['id']])}" class="repulse cl-f fs065 bg-c40">查看活动参与者</a>
        </div>
        {else /}
        {eq name="data.member_status" value="未申请"}
        <div class="my-flex exerciseBtn">
            <a href="javascript:;" data-id="{$data.id}" class="repulse cl-f fs065 bg-c40 i_want_to_participate">我要参加</a>
        </div>
        {else /}
        <div class="my-flex exerciseBtn">
            {eq name="data.member_status" value="审核通过"}
                {eq name="data.member_registration" value="0"}
                <a href="javascript:;" data-id="{$data.id}" class="repulse cl-f fs065 bg-c40 activity_registration">签到</a>
                {/eq}
            {/eq}
            <a href="javascript:;" class="repulse cl-f fs065 bg-ffa quit_activity" data-id="{$data.id}">退出活动</a>
        </div>
        {/eq}
        {/eq}
        {/eq}
    </div>
</div>

<script src="__STATIC__/home/jquery_weui/js/swiper.min.js"></script>
<script>
    SCOPE.participate_activity_url = "{:url('participate')}"; // 定义参加活动url
    SCOPE.activity_page_type = "nearby"; // 定义参加活动url
    SCOPE.quit_activity_url = "{:url('quit_activity')}";  // 退出活动按钮
    SCOPE.activity_registration_url = "{:url('activity_registration')}" // 签到按钮
</script>
{/empty}